3.245 \(\int x^2 \sqrt{-c+d x} \sqrt{c+d x} \left (a+b x^2\right ) \, dx\)

Optimal. Leaf size=159 \[ \frac{c^2 x \sqrt{d x-c} \sqrt{c+d x} \left (2 a d^2+b c^2\right )}{16 d^4}+\frac{x (d x-c)^{3/2} (c+d x)^{3/2} \left (2 a d^2+b c^2\right )}{8 d^4}-\frac{c^4 \left (2 a d^2+b c^2\right ) \tanh ^{-1}\left (\frac{\sqrt{d x-c}}{\sqrt{c+d x}}\right )}{8 d^5}+\frac{b x^3 (d x-c)^{3/2} (c+d x)^{3/2}}{6 d^2} \]

[Out]

(c^2*(b*c^2 + 2*a*d^2)*x*Sqrt[-c + d*x]*Sqrt[c + d*x])/(16*d^4) + ((b*c^2 + 2*a*
d^2)*x*(-c + d*x)^(3/2)*(c + d*x)^(3/2))/(8*d^4) + (b*x^3*(-c + d*x)^(3/2)*(c +
d*x)^(3/2))/(6*d^2) - (c^4*(b*c^2 + 2*a*d^2)*ArcTanh[Sqrt[-c + d*x]/Sqrt[c + d*x
]])/(8*d^5)

_______________________________________________________________________________________

Rubi [A]  time = 0.377282, antiderivative size = 159, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.194 \[ \frac{c^2 x \sqrt{d x-c} \sqrt{c+d x} \left (2 a d^2+b c^2\right )}{16 d^4}+\frac{x (d x-c)^{3/2} (c+d x)^{3/2} \left (2 a d^2+b c^2\right )}{8 d^4}-\frac{c^4 \left (2 a d^2+b c^2\right ) \tanh ^{-1}\left (\frac{\sqrt{d x-c}}{\sqrt{c+d x}}\right )}{8 d^5}+\frac{b x^3 (d x-c)^{3/2} (c+d x)^{3/2}}{6 d^2} \]

Antiderivative was successfully verified.

[In]  Int[x^2*Sqrt[-c + d*x]*Sqrt[c + d*x]*(a + b*x^2),x]

[Out]

(c^2*(b*c^2 + 2*a*d^2)*x*Sqrt[-c + d*x]*Sqrt[c + d*x])/(16*d^4) + ((b*c^2 + 2*a*
d^2)*x*(-c + d*x)^(3/2)*(c + d*x)^(3/2))/(8*d^4) + (b*x^3*(-c + d*x)^(3/2)*(c +
d*x)^(3/2))/(6*d^2) - (c^4*(b*c^2 + 2*a*d^2)*ArcTanh[Sqrt[-c + d*x]/Sqrt[c + d*x
]])/(8*d^5)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 23.9385, size = 139, normalized size = 0.87 \[ \frac{b x^{3} \left (- c + d x\right )^{\frac{3}{2}} \left (c + d x\right )^{\frac{3}{2}}}{6 d^{2}} - \frac{c^{4} \left (2 a d^{2} + b c^{2}\right ) \operatorname{atanh}{\left (\frac{\sqrt{c + d x}}{\sqrt{- c + d x}} \right )}}{8 d^{5}} + \frac{c^{2} x \sqrt{- c + d x} \sqrt{c + d x} \left (2 a d^{2} + b c^{2}\right )}{16 d^{4}} + \frac{x \left (- c + d x\right )^{\frac{3}{2}} \left (c + d x\right )^{\frac{3}{2}} \left (2 a d^{2} + b c^{2}\right )}{8 d^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2*(b*x**2+a)*(d*x-c)**(1/2)*(d*x+c)**(1/2),x)

[Out]

b*x**3*(-c + d*x)**(3/2)*(c + d*x)**(3/2)/(6*d**2) - c**4*(2*a*d**2 + b*c**2)*at
anh(sqrt(c + d*x)/sqrt(-c + d*x))/(8*d**5) + c**2*x*sqrt(-c + d*x)*sqrt(c + d*x)
*(2*a*d**2 + b*c**2)/(16*d**4) + x*(-c + d*x)**(3/2)*(c + d*x)**(3/2)*(2*a*d**2
+ b*c**2)/(8*d**4)

_______________________________________________________________________________________

Mathematica [A]  time = 0.122253, size = 120, normalized size = 0.75 \[ \frac{d x \sqrt{d x-c} \sqrt{c+d x} \left (b \left (-3 c^4-2 c^2 d^2 x^2+8 d^4 x^4\right )-6 a d^2 \left (c^2-2 d^2 x^2\right )\right )-3 \left (2 a c^4 d^2+b c^6\right ) \log \left (\sqrt{d x-c} \sqrt{c+d x}+d x\right )}{48 d^5} \]

Antiderivative was successfully verified.

[In]  Integrate[x^2*Sqrt[-c + d*x]*Sqrt[c + d*x]*(a + b*x^2),x]

[Out]

(d*x*Sqrt[-c + d*x]*Sqrt[c + d*x]*(-6*a*d^2*(c^2 - 2*d^2*x^2) + b*(-3*c^4 - 2*c^
2*d^2*x^2 + 8*d^4*x^4)) - 3*(b*c^6 + 2*a*c^4*d^2)*Log[d*x + Sqrt[-c + d*x]*Sqrt[
c + d*x]])/(48*d^5)

_______________________________________________________________________________________

Maple [C]  time = 0.018, size = 240, normalized size = 1.5 \[{\frac{{\it csgn} \left ( d \right ) }{48\,{d}^{5}}\sqrt{dx-c}\sqrt{dx+c} \left ( 8\,{\it csgn} \left ( d \right ){x}^{5}b{d}^{5}\sqrt{{d}^{2}{x}^{2}-{c}^{2}}+12\,{\it csgn} \left ( d \right ){x}^{3}a{d}^{5}\sqrt{{d}^{2}{x}^{2}-{c}^{2}}-2\,{\it csgn} \left ( d \right ){x}^{3}b{c}^{2}{d}^{3}\sqrt{{d}^{2}{x}^{2}-{c}^{2}}-6\,a{c}^{2}x\sqrt{{d}^{2}{x}^{2}-{c}^{2}}{d}^{3}{\it csgn} \left ( d \right ) -3\,b{c}^{4}x\sqrt{{d}^{2}{x}^{2}-{c}^{2}}{\it csgn} \left ( d \right ) d-6\,a{c}^{4}\ln \left ( \left ({\it csgn} \left ( d \right ) \sqrt{{d}^{2}{x}^{2}-{c}^{2}}+dx \right ){\it csgn} \left ( d \right ) \right ){d}^{2}-3\,b{c}^{6}\ln \left ( \left ({\it csgn} \left ( d \right ) \sqrt{{d}^{2}{x}^{2}-{c}^{2}}+dx \right ){\it csgn} \left ( d \right ) \right ) \right ){\frac{1}{\sqrt{{d}^{2}{x}^{2}-{c}^{2}}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2*(b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2),x)

[Out]

1/48*(d*x-c)^(1/2)*(d*x+c)^(1/2)*(8*csgn(d)*x^5*b*d^5*(d^2*x^2-c^2)^(1/2)+12*csg
n(d)*x^3*a*d^5*(d^2*x^2-c^2)^(1/2)-2*csgn(d)*x^3*b*c^2*d^3*(d^2*x^2-c^2)^(1/2)-6
*a*c^2*x*(d^2*x^2-c^2)^(1/2)*d^3*csgn(d)-3*b*c^4*x*(d^2*x^2-c^2)^(1/2)*csgn(d)*d
-6*a*c^4*ln((csgn(d)*(d^2*x^2-c^2)^(1/2)+d*x)*csgn(d))*d^2-3*b*c^6*ln((csgn(d)*(
d^2*x^2-c^2)^(1/2)+d*x)*csgn(d)))*csgn(d)/(d^2*x^2-c^2)^(1/2)/d^5

_______________________________________________________________________________________

Maxima [A]  time = 1.3891, size = 284, normalized size = 1.79 \[ \frac{{\left (d^{2} x^{2} - c^{2}\right )}^{\frac{3}{2}} b x^{3}}{6 \, d^{2}} - \frac{b c^{6} \log \left (2 \, d^{2} x + 2 \, \sqrt{d^{2} x^{2} - c^{2}} \sqrt{d^{2}}\right )}{16 \, \sqrt{d^{2}} d^{4}} - \frac{a c^{4} \log \left (2 \, d^{2} x + 2 \, \sqrt{d^{2} x^{2} - c^{2}} \sqrt{d^{2}}\right )}{8 \, \sqrt{d^{2}} d^{2}} + \frac{\sqrt{d^{2} x^{2} - c^{2}} b c^{4} x}{16 \, d^{4}} + \frac{\sqrt{d^{2} x^{2} - c^{2}} a c^{2} x}{8 \, d^{2}} + \frac{{\left (d^{2} x^{2} - c^{2}\right )}^{\frac{3}{2}} b c^{2} x}{8 \, d^{4}} + \frac{{\left (d^{2} x^{2} - c^{2}\right )}^{\frac{3}{2}} a x}{4 \, d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)*sqrt(d*x + c)*sqrt(d*x - c)*x^2,x, algorithm="maxima")

[Out]

1/6*(d^2*x^2 - c^2)^(3/2)*b*x^3/d^2 - 1/16*b*c^6*log(2*d^2*x + 2*sqrt(d^2*x^2 -
c^2)*sqrt(d^2))/(sqrt(d^2)*d^4) - 1/8*a*c^4*log(2*d^2*x + 2*sqrt(d^2*x^2 - c^2)*
sqrt(d^2))/(sqrt(d^2)*d^2) + 1/16*sqrt(d^2*x^2 - c^2)*b*c^4*x/d^4 + 1/8*sqrt(d^2
*x^2 - c^2)*a*c^2*x/d^2 + 1/8*(d^2*x^2 - c^2)^(3/2)*b*c^2*x/d^4 + 1/4*(d^2*x^2 -
 c^2)^(3/2)*a*x/d^2

_______________________________________________________________________________________

Fricas [A]  time = 0.345833, size = 741, normalized size = 4.66 \[ -\frac{256 \, b d^{12} x^{12} - 192 \,{\left (3 \, b c^{2} d^{10} - 2 \, a d^{12}\right )} x^{10} + 48 \,{\left (7 \, b c^{4} d^{8} - 20 \, a c^{2} d^{10}\right )} x^{8} + 4 \,{\left (17 \, b c^{6} d^{6} + 210 \, a c^{4} d^{8}\right )} x^{6} - 6 \,{\left (17 \, b c^{8} d^{4} + 50 \, a c^{6} d^{6}\right )} x^{4} + 18 \,{\left (b c^{10} d^{2} + 2 \, a c^{8} d^{4}\right )} x^{2} -{\left (256 \, b d^{11} x^{11} - 64 \,{\left (7 \, b c^{2} d^{9} - 6 \, a d^{11}\right )} x^{9} + 48 \,{\left (3 \, b c^{4} d^{7} - 16 \, a c^{2} d^{9}\right )} x^{7} + 4 \,{\left (25 \, b c^{6} d^{5} + 126 \, a c^{4} d^{7}\right )} x^{5} - 4 \,{\left (13 \, b c^{8} d^{3} + 30 \, a c^{6} d^{5}\right )} x^{3} + 3 \,{\left (b c^{10} d + 2 \, a c^{8} d^{3}\right )} x\right )} \sqrt{d x + c} \sqrt{d x - c} + 3 \,{\left (b c^{12} + 2 \, a c^{10} d^{2} - 32 \,{\left (b c^{6} d^{6} + 2 \, a c^{4} d^{8}\right )} x^{6} + 48 \,{\left (b c^{8} d^{4} + 2 \, a c^{6} d^{6}\right )} x^{4} - 18 \,{\left (b c^{10} d^{2} + 2 \, a c^{8} d^{4}\right )} x^{2} + 2 \,{\left (16 \,{\left (b c^{6} d^{5} + 2 \, a c^{4} d^{7}\right )} x^{5} - 16 \,{\left (b c^{8} d^{3} + 2 \, a c^{6} d^{5}\right )} x^{3} + 3 \,{\left (b c^{10} d + 2 \, a c^{8} d^{3}\right )} x\right )} \sqrt{d x + c} \sqrt{d x - c}\right )} \log \left (-d x + \sqrt{d x + c} \sqrt{d x - c}\right )}{48 \,{\left (32 \, d^{11} x^{6} - 48 \, c^{2} d^{9} x^{4} + 18 \, c^{4} d^{7} x^{2} - c^{6} d^{5} - 2 \,{\left (16 \, d^{10} x^{5} - 16 \, c^{2} d^{8} x^{3} + 3 \, c^{4} d^{6} x\right )} \sqrt{d x + c} \sqrt{d x - c}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)*sqrt(d*x + c)*sqrt(d*x - c)*x^2,x, algorithm="fricas")

[Out]

-1/48*(256*b*d^12*x^12 - 192*(3*b*c^2*d^10 - 2*a*d^12)*x^10 + 48*(7*b*c^4*d^8 -
20*a*c^2*d^10)*x^8 + 4*(17*b*c^6*d^6 + 210*a*c^4*d^8)*x^6 - 6*(17*b*c^8*d^4 + 50
*a*c^6*d^6)*x^4 + 18*(b*c^10*d^2 + 2*a*c^8*d^4)*x^2 - (256*b*d^11*x^11 - 64*(7*b
*c^2*d^9 - 6*a*d^11)*x^9 + 48*(3*b*c^4*d^7 - 16*a*c^2*d^9)*x^7 + 4*(25*b*c^6*d^5
 + 126*a*c^4*d^7)*x^5 - 4*(13*b*c^8*d^3 + 30*a*c^6*d^5)*x^3 + 3*(b*c^10*d + 2*a*
c^8*d^3)*x)*sqrt(d*x + c)*sqrt(d*x - c) + 3*(b*c^12 + 2*a*c^10*d^2 - 32*(b*c^6*d
^6 + 2*a*c^4*d^8)*x^6 + 48*(b*c^8*d^4 + 2*a*c^6*d^6)*x^4 - 18*(b*c^10*d^2 + 2*a*
c^8*d^4)*x^2 + 2*(16*(b*c^6*d^5 + 2*a*c^4*d^7)*x^5 - 16*(b*c^8*d^3 + 2*a*c^6*d^5
)*x^3 + 3*(b*c^10*d + 2*a*c^8*d^3)*x)*sqrt(d*x + c)*sqrt(d*x - c))*log(-d*x + sq
rt(d*x + c)*sqrt(d*x - c)))/(32*d^11*x^6 - 48*c^2*d^9*x^4 + 18*c^4*d^7*x^2 - c^6
*d^5 - 2*(16*d^10*x^5 - 16*c^2*d^8*x^3 + 3*c^4*d^6*x)*sqrt(d*x + c)*sqrt(d*x - c
))

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int x^{2} \left (a + b x^{2}\right ) \sqrt{- c + d x} \sqrt{c + d x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2*(b*x**2+a)*(d*x-c)**(1/2)*(d*x+c)**(1/2),x)

[Out]

Integral(x**2*(a + b*x**2)*sqrt(-c + d*x)*sqrt(c + d*x), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.28994, size = 311, normalized size = 1.96 \[ \frac{6 \,{\left (\frac{2 \, c^{4}{\rm ln}\left ({\left | -\sqrt{d x + c} + \sqrt{d x - c} \right |}\right )}{d^{2}} +{\left ({\left (d x + c\right )}{\left (2 \,{\left (d x + c\right )}{\left (\frac{d x + c}{d^{2}} - \frac{3 \, c}{d^{2}}\right )} + \frac{5 \, c^{2}}{d^{2}}\right )} - \frac{c^{3}}{d^{2}}\right )} \sqrt{d x + c} \sqrt{d x - c}\right )} a +{\left (\frac{6 \, c^{6}{\rm ln}\left ({\left | -\sqrt{d x + c} + \sqrt{d x - c} \right |}\right )}{d^{4}} +{\left ({\left (2 \,{\left ({\left (d x + c\right )}{\left (4 \,{\left (d x + c\right )}{\left (\frac{d x + c}{d^{4}} - \frac{5 \, c}{d^{4}}\right )} + \frac{39 \, c^{2}}{d^{4}}\right )} - \frac{37 \, c^{3}}{d^{4}}\right )}{\left (d x + c\right )} + \frac{31 \, c^{4}}{d^{4}}\right )}{\left (d x + c\right )} - \frac{3 \, c^{5}}{d^{4}}\right )} \sqrt{d x + c} \sqrt{d x - c}\right )} b}{48 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)*sqrt(d*x + c)*sqrt(d*x - c)*x^2,x, algorithm="giac")

[Out]

1/48*(6*(2*c^4*ln(abs(-sqrt(d*x + c) + sqrt(d*x - c)))/d^2 + ((d*x + c)*(2*(d*x
+ c)*((d*x + c)/d^2 - 3*c/d^2) + 5*c^2/d^2) - c^3/d^2)*sqrt(d*x + c)*sqrt(d*x -
c))*a + (6*c^6*ln(abs(-sqrt(d*x + c) + sqrt(d*x - c)))/d^4 + ((2*((d*x + c)*(4*(
d*x + c)*((d*x + c)/d^4 - 5*c/d^4) + 39*c^2/d^4) - 37*c^3/d^4)*(d*x + c) + 31*c^
4/d^4)*(d*x + c) - 3*c^5/d^4)*sqrt(d*x + c)*sqrt(d*x - c))*b)/d